<template>
  <!-- <div class="app-container text-center"> -->
  <div class='text-center'>
    <p style="font-size: 52px;line-height: 100px;color:transparent">欢迎访问</p>
    <p style="font-size: 40px;font-weight: 200;color: #666666">
      您正在访问的是：<span>{{welcome}}</span><span>{{description}}</span></p>
    <div style='width:100%;height:50vh;background:url(./imgs/home.png) no-repeat;margin-top:8%;background-size:150%'>
    </div>
  </div>
</template>

<script>
export default {
  name: 'welcome',
  data() {
    return {
      api: this.$api.siteInfo,
      baseUrl: this.$api.baseUrl,
      welcome: '',
      description: '',
    }
  },
  methods: {
    getSiteInfo() {
      this.$request(this.api)
        .then((r) => {
          let description = r.find((i) => i.param_name == 'SYSTEM_NAME')
          let welcome = r.find((i) => i.param_name == 'COMPANY_NAME')
          this.description = description ? description.param_value : '智能制造平台'
          this.welcome = welcome ? welcome.param_value : '第六研究所'
        })
        .catch(() => {
          this.welcome = '第六研究所'
          this.description = '智能制造平台'
        })
    },
  },
  created: function () {
    this.getSiteInfo()
  },
}
</script>

<style scoped>
</style>
